home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 December / PCWDEC06.iso / Software / Trial / Paint Shop Pro XI / Data1.cab / _7DF56E52843B49E9932B0540053104D3 < prev    next >
Encoding:
Text File  |  2006-08-04  |  6.3 KB  |  175 lines

  1. from PSPApp import *
  2. import PSPUtils
  3.  
  4. def ScriptProperties():
  5.     return {
  6.         'Author': 'Tracy Pori',
  7.         'Copyright': '',
  8.         'Description': "Makes image look like a pencil sketch.",
  9.         'Host': 'Paint Shop Pro',
  10.         'Host Version': '8.00'
  11.         }
  12.  
  13.  
  14. def Do(Environment):
  15.     if PSPUtils.LayerIsBackground( Environment, App.TargetDocument ):
  16.         App.Do( Environment, 'LayerPromoteBackground', {
  17.                 'GeneralSettings': {
  18.                     'ExecutionMode': App.Constants.ExecutionMode.Default, 
  19.                     'AutoActionMode': App.Constants.AutoActionMode.Match
  20.                     }
  21.                 })
  22.  
  23.     App.Do( Environment, 'Colorize', {
  24.             'Hue': 147, 
  25.             'Saturation': 0, 
  26.             'GeneralSettings': {
  27.                 'ExecutionMode': App.Constants.ExecutionMode.Default, 
  28.                 'AutoActionMode': App.Constants.AutoActionMode.Match
  29.                 }
  30.             })
  31.  
  32.     App.Do( Environment, 'LayerDuplicate', {
  33.             'GeneralSettings': {
  34.                 'ExecutionMode': App.Constants.ExecutionMode.Default, 
  35.                 'AutoActionMode': App.Constants.AutoActionMode.Match
  36.                 }
  37.             })
  38.  
  39.     App.Do( Environment, 'NegativeImage', {
  40.             'GeneralSettings': {
  41.                 'ExecutionMode': App.Constants.ExecutionMode.Default, 
  42.                 'AutoActionMode': App.Constants.AutoActionMode.Match
  43.                 }
  44.             })
  45.  
  46.     App.Do( Environment, 'GaussianBlur', {
  47.             'Radius': 9.000000, 
  48.             'GeneralSettings': {
  49.                 'ExecutionMode': App.Constants.ExecutionMode.Default, 
  50.                 'AutoActionMode': App.Constants.AutoActionMode.Match
  51.                 }
  52.             })
  53.  
  54.     App.Do( Environment, 'LayerProperties', {
  55.             'General': {
  56.                 'Opacity': None, 
  57.                 'Name': None, 
  58.                 'IsVisible': None, 
  59.                 'IsTransparencyLocked': None, 
  60.                 'LinkSet': None, 
  61.                 'UseHighlight': None, 
  62.                 'PaletteHighlightColor': None, 
  63.                 'GroupLink': None, 
  64.                 'BlendMode': App.Constants.BlendMode.Dodge
  65.                 }, 
  66.             'BlendRanges': None, 
  67.             'Path': (0,0,[],App.Constants.Boolean.false), 
  68.             'BrightnessContrast': None, 
  69.             'ChannelMixer': None, 
  70.             'ColorBalance': None, 
  71.             'CurveParams': None, 
  72.             'HSL': None, 
  73.             'Threshold': None, 
  74.             'Levels': None, 
  75.             'Posterize': None, 
  76.             'Overlay': None, 
  77.             'GeneralSettings': {
  78.                 'ExecutionMode': App.Constants.ExecutionMode.Silent, 
  79.                 'AutoActionMode': App.Constants.AutoActionMode.Default
  80.                 }
  81.             })
  82.  
  83.     App.Do( Environment, 'NewRasterLayer', {
  84.             'General': {
  85.                 'Opacity': 100, 
  86.                 'Name': PSPUtils.LayerName_Blackandwhitepencil, 
  87.                 'IsVisible': App.Constants.Boolean.true, 
  88.                 'IsTransparencyLocked': App.Constants.Boolean.false, 
  89.                 'LinkSet': 0, 
  90.                 'UseHighlight': App.Constants.Boolean.false, 
  91.                 'PaletteHighlightColor': (255,255,64), 
  92.                 'GroupLink': App.Constants.Boolean.true, 
  93.                 'BlendMode': App.Constants.BlendMode.Normal
  94.                 }, 
  95.             'BlendRanges': {
  96.                 'BlendRangeGreen': (0,0,255,255,0,0,255,255), 
  97.                 'BlendRangeRed': (0,0,255,255,0,0,255,255), 
  98.                 'BlendRangeBlue': (0,0,255,255,0,0,255,255), 
  99.                 'BlendRangeGrey': (0,0,255,255,0,0,255,255)
  100.                 }, 
  101.             'GeneralSettings': {
  102.                 'ExecutionMode': App.Constants.ExecutionMode.Default, 
  103.                 'AutoActionMode': App.Constants.AutoActionMode.Match
  104.                 }
  105.             })
  106.  
  107.     App.Do( Environment, 'Fill', {
  108.             'BlendMode': 0, 
  109.             'MatchMode': 1, 
  110.             'Material': {
  111.                 'Color': (255,255,255), 
  112.                 'Pattern': None, 
  113.                 'Gradient': None, 
  114.                 'Texture': None
  115.                 }, 
  116.             'UseForground': App.Constants.Boolean.true, 
  117.             'Opacity': 100, 
  118.             'Point': (388.000000000,341.000000000), 
  119.             'SampleMerged': 0, 
  120.             'Tolerance': 200, 
  121.             'GeneralSettings': {
  122.                 'ExecutionMode': App.Constants.ExecutionMode.Default, 
  123.                 'AutoActionMode': App.Constants.AutoActionMode.Match
  124.                 }
  125.             })
  126.  
  127.     App.Do( Environment, 'AddNoise', {
  128.             'Amount': 100, 
  129.             'Type': 2, 
  130.             'Monochrome': App.Constants.Boolean.true, 
  131.             'GeneralSettings': {
  132.                 'ExecutionMode': App.Constants.ExecutionMode.Default, 
  133.                 'RandomSeed': 29192734, 
  134.                 'AutoActionMode': App.Constants.AutoActionMode.Match
  135.                 }
  136.             })
  137.  
  138.     App.Do( Environment, 'MotionBlur', {
  139.             'Strength': 100.000000, 
  140.             'Angle': 48.000000, 
  141.             'GeneralSettings': {
  142.                 'ExecutionMode': App.Constants.ExecutionMode.Default, 
  143.                 'AutoActionMode': App.Constants.AutoActionMode.Match
  144.                 }
  145.             })
  146.  
  147.     App.Do( Environment, 'LayerProperties', {
  148.             'General': {
  149.                 'Opacity': 61, 
  150.                 'Name': None, 
  151.                 'IsVisible': None, 
  152.                 'IsTransparencyLocked': None, 
  153.                 'LinkSet': None, 
  154.                 'UseHighlight': None, 
  155.                 'PaletteHighlightColor': None, 
  156.                 'GroupLink': None, 
  157.                 'BlendMode': App.Constants.BlendMode.Multiply
  158.                 }, 
  159.             'BlendRanges': None, 
  160.             'Path': (0,0,[],App.Constants.Boolean.false), 
  161.             'BrightnessContrast': None, 
  162.             'ChannelMixer': None, 
  163.             'ColorBalance': None, 
  164.             'CurveParams': None, 
  165.             'HSL': None, 
  166.             'Threshold': None, 
  167.             'Levels': None, 
  168.             'Posterize': None, 
  169.             'Overlay': None, 
  170.             'GeneralSettings': {
  171.                 'ExecutionMode': App.Constants.ExecutionMode.Silent, 
  172.                 'AutoActionMode': App.Constants.AutoActionMode.Default
  173.                 }
  174.             })
  175.